// @ts-ignore
/* eslint-disable */
import request from '@/request.ts'

/** 此处后端没有提供注释 GET /ai/simple/dochat */
export async function doChat(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.doChatParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseString>('/api/ai/simple/dochat', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /ai/simple/dochat/server/sent/event */
export async function doChatDemoServerSentEvent(
  body: API.ConversationAddRequest,
  options?: { [key: string]: any }
) {
  return request<API.ServerSentEventString[]>('/api/ai/simple/dochat/server/sent/event', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /ai/simple/dochat/sse */
export async function doChatDemoSse(
  body: API.ConversationAddRequest,
  options?: { [key: string]: any }
) {
  return request<string[]>('/api/ai/simple/dochat/sse', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /ai/simple/dochat/sse/emitter */
export async function doChatDemoSseEmitter(
  body: API.ConversationAddRequest,
  options?: { [key: string]: any }
) {
  return request<API.SseEmitter>('/api/ai/simple/dochat/sse/emitter', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
